export default config => {
	return `
	<template>
	<div :class="[b(), className]" :style="styleSizeName">表单组件模板</div>
</template>

<script>
	import create from '../../create';
	import { mapState } from 'vuex';
	export default create({
		name: '${config.compName}',
		props: {
			option: {
				type: Object,
				default: () => {
					return {};
				}
			}
		},
		data() {
			return {};
		},
		computed: {
			...mapState({
				globalEventList: state => state.event.globalEventList
			}),
			styleName() {
				return Object.assign({}, this.styles);
			}
		},
		watch: {},
		mounted() { },
		methods: {
			// 按钮点击时
			handleSubmit(value) {
				// 从事件处理池中找当前组件的事件
				this.$globalEvent({
					compId: this.$attrs.index,
					compName: this.$attrs.name,
					compParams: {
						value: this.dataChart.value
					},
					eventName: '按钮点击时事件',
					globalEventList: this.globalEventList
				});
			}
		}
	});
</script>

<style lang="scss" scoped></style>
	`;
};
